package cn.com.ytst.data.integration.core.plugin;



import com.alibaba.datax.common.util.Configuration;

import cn.com.ytst.data.integration.core.channel.PipleChannel;
import cn.com.ytst.data.integration.core.channel.event.EventSourceProduct;

/**
 * @ClassName Reader
 * @Deacription
 * @Author Administrator
 * @Date 2020/1/4 0004 15:25
 * @Version 1.0
 **/
public abstract class Reader {



    private PipleChannel pipleChannel;

	private Configuration readerConfiguration;
	
	private EventSourceProduct eventSourceProduct ;
	
	

	public EventSourceProduct getEventSourceProduct() {
		return eventSourceProduct;
	}

	public void setEventSourceProduct(EventSourceProduct eventSourceProduct) {
		this.eventSourceProduct = eventSourceProduct;
	}

	public Reader(){

	}

	public  abstract void init();

    //获取读插件配置
	public void setPluginJobConf(Configuration readerConfiguration){
          this.readerConfiguration = readerConfiguration;
	}

	public Configuration getPluginJobConf(){
		return this.readerConfiguration;
	}



	public abstract void startReader();

	public void readerLine(){
		startReader();
	}

	public abstract void destroy();

	public PipleChannel getPipleChannel() {
		return pipleChannel;
	}

	public void setPipleChannel(PipleChannel pipleChannel) {
		this.pipleChannel = pipleChannel;
	}
}
